##-----------------------------------------------------------------------------##
##  Replication Code for: Zvobgo, Kelebogile, and Alan J. Simmons.             ##
##                        “Do Americans Support War Crimes Prosecutions?”      ##
##                        Foreign Policy Analysis.                             ##
##                                                                             ##
##  Balance tests                                                              ##
##                                                                             ##
##  Prepared for public posting in September 2024                              ##
##-----------------------------------------------------------------------------##


install.packages("RItools")
install.packages("foreign")
library(RItools)
library(foreign)


remove(list=ls())
setwd("/Users/kelebogilezvobgo/Library/CloudStorage/Dropbox/War Crimes Prosecutions/FPA_FINAL/Data")
warcrimes <- read.dta("Data_zs2024warcrimesprosecutions.dta")

xBalance(humanrightstreatment ~ white + woman + liberal + conservative + democrat + republican + atleastbachelors + under40, data=warcrimes,
         report="all", na.rm = TRUE)
xBalance(nationalinteresttreatment ~ white + woman + liberal + conservative + democrat + republican + atleastbachelors + under40, data=warcrimes,
         report="all", na.rm = TRUE)
xBalance(competingframestreatment ~ white + woman + liberal + conservative + democrat + republican + atleastbachelors + under40, data=warcrimes,
         report="all", na.rm = TRUE)
xBalance(control ~ white + woman + liberal + conservative + democrat + republican + atleastbachelors + under40, data=warcrimes,
         report="all", na.rm = TRUE)
###

